export default {
  methods: {
    linkPdfOffice(params) {
      const fileType = params.substring(params.lastIndexOf('.')).toLowerCase()
      if (['.pdf'].includes(fileType)) {
        path = 'http://192.168.11.242/pdf/web/viewer.html?file='
      } else if (['.docx', '.word', '.ppt', '.pptx', '.excel', '.xlsx', '.xls'].includes(fileType)) {
        path = 'https://view.officeapps.live.com/op/view.aspx?src='
      } else {
        window.open(params, '_blank')
        return
      }
      window.open(path + encodeURIComponent(params))
    }
  }
}
